﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
 Inherits="System.Web.Mvc.ViewPage<IntellectShop.Web2.Hardware.ViewModels.OrderEditViewModel>" %>
<%@ Import Namespace="IntellectShop.Web2.Hardware.Code" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%= Html.Resource("Create") %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<h1><%= Html.Resource("Create") %></h1>
	<div class="innerArticle">
		<% Html.RenderAction("ViewBody", "PageContent", new { pageContentUniqName = IntellectShop.Common.PageContentUniqName.OrderCreate }); %>
	</div>

	<% Html.EnableClientValidation(); %>
	<p style="color:Red;"><%= Html.Encode(Model.Message) %></p>

	<% using (Html.BeginForm()) {%>
		<%= Html.ValidationSummary(true) %>

		<%= Html.EditorFor(model => model.Order)%>
			
		<div class="spacer">&nbsp;</div>
		<div class="row">
			<span class="formlabel"></span>
			<span class="forminput">
				<input type="submit" value="<%= Html.Encode(Html.Resource("Strings, Create"))%>" class="submit"/>
			</span>
		</div>
	<% } %>

	<% if (HttpContext.Current.User.IsInRole(IntellectShop.Common.Globals.AdministratorRoleName))
	{ %>
	<div>
		<%= Html.ActionLink(Html.Resource("Strings, BackToList"), "Index")%>
	</div>
	<% } %>
</asp:Content>

